package com.jneagle.xlstool.bzwgjmx.view.structure;

import com.dwarfeng.dutil.develop.setting.SettingEnumItem;
import com.dwarfeng.dutil.develop.setting.SettingInfo;
import com.dwarfeng.dutil.develop.setting.info.BooleanSettingInfo;
import com.dwarfeng.dutil.develop.setting.info.FileSettingInfo;
import com.dwarfeng.dutil.develop.setting.info.IntegerSettingInfo;

/**
 * 模态条目
 *
 * @author DwArFeng
 * @since 1.0.0
 */
public enum ModalItem implements SettingEnumItem {

    /**
     * 上一次读取的文件。
     */
    MODAL_STRUCTURED_DATA_LAST_LOAD_FILE("modal.structured_data.last_load_file", new FileSettingInfo("attributes")),
    /**
     * 上一次是否读取。
     */
    MODAL_STRUCTURED_DATA_LAST_LOAD_FLAG("modal.structured_data.last-load-flag", new BooleanSettingInfo("false")),
    /**
     * 上一次是否读取。
     */
    MODAL_RAW_DATA_LAST_LOAD_DIRECTORY("modal.raw_data.last_load_directory", new FileSettingInfo("attributes")),
    /**
     * 上一次是否读取。
     */
    MODAL_DATA_CONFIRM_LAST_SELECTOR("modal.data_confirm.last_selector", new IntegerSettingInfo("0"));

    private final String name;
    private final SettingInfo settingInfo;

    ModalItem(String name, SettingInfo settingInfo) {
        this.name = name;
        this.settingInfo = settingInfo;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getName() {
        return name;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public SettingInfo getSettingInfo() {
        return settingInfo;
    }

}
